﻿<Window 
    x:Class="Sidvall.UI.Wpf.Test.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Converters="clr-namespace:Sidvall.UI.Wpf.Converters;assembly=Sidvall.UI.Wpf" 
    xmlns:local="clr-namespace:Sidvall.UI.Wpf.Test"
    xmlns:Controls2="clr-namespace:Sidvall.UI.Wpf.Controls;assembly=Sidvall.UI.Wpf" 
    xmlns:vms="clr-namespace:Sidvall.UI.Wpf.Test.ViewModels"
    mc:Ignorable="d"
    Title="MainWindow" Height="350" Width="525">

    <Window.Resources>
        <Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    </Window.Resources>

    <Grid d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type={x:Type vms:MainWindowViewModel}}">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Controls2:BusyIndicatorControl HeaderCaption="PROCESSING..." 
                                       Visibility="{Binding IsBusy, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}" 
                                       Panel.ZIndex="20" />
        <Controls2:ExtendedCheckBoxControl Grid.Row="1" x:Name="ExtendedCheckBoxControl" DisplayMode="TrueFalseNull" Value1Caption="Yes" Value2Caption="No" Value3Caption="None" 
                                           ItemMargin="20,0,0,0" LabelMargin="10,10,0,10" IsNullable="False" 
                                           LabelText="Question 1:">
            <Controls2:ExtendedCheckBoxControl.LabelLeftContent>
                <TextBlock Text="*" />
            </Controls2:ExtendedCheckBoxControl.LabelLeftContent>
            <Controls2:ExtendedCheckBoxControl.LabelRightContent>
                <TextBlock Text="*" />
            </Controls2:ExtendedCheckBoxControl.LabelRightContent>
        </Controls2:ExtendedCheckBoxControl>
        <Controls2:RadioButtonListControl Grid.Row="2" ItemsSource="{Binding MenuItems}" DisplayMemberPath="Name" SelectedValuePath="Id" 
                                          ItemOrientation="Horizontal" SelectedValue="{Binding SelectedMenuItem.Id}"
                                          LabelMargin="10,10,0,10" 
                                          LabelText="Question 2:">
            <Controls2:RadioButtonListControl.LabelLeftContent>
                <TextBlock Text="*" />
            </Controls2:RadioButtonListControl.LabelLeftContent>
            <Controls2:RadioButtonListControl.LabelRightContent>
                <TextBlock Text="*" />
            </Controls2:RadioButtonListControl.LabelRightContent>
        </Controls2:RadioButtonListControl>
        <TextBox Grid.Row="3" Text="aaa" />
        <Controls2:HeaderedTextBox Grid.Row="4" 
                                   LabelText="sdd ldshf ehfowhea hg oragö ögbihre öghseöböherg öhböä rejhgöäjuäfpbj bäjdäb jarebj sdlf öowegöo wroigh eqfrje ofg" 
                                   Text="Hello!" TextBoxFontWeight="Bold">
            <Controls2:HeaderedTextBox.LabelLeftContent>
                <TextBlock Text="*" />
            </Controls2:HeaderedTextBox.LabelLeftContent>
            <Controls2:HeaderedTextBox.LabelRightContent>
                <TextBlock Text="*" />
            </Controls2:HeaderedTextBox.LabelRightContent>
        </Controls2:HeaderedTextBox>

        <Button Grid.Row="5" x:Name="button" Content="Login" HorizontalAlignment="Left" Margin="59,111,0,0" VerticalAlignment="Top" Width="75" Click="button_Click"/>
    </Grid>
</Window>
